﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CailiaoUpload.aspx.cs" Inherits="Common_CailiaoUpload" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>申报时的文件上传功能</title>
    <script type="text/javascript">
        //打开下载页面方法 addby zhongjian 20090923
        function DownLoad(strID) {
            window.location.href = "AppearOtherResouce.aspx?type=fujian&id=" + strID;
        }
        function DownLoad1(strID) {
            window.location.href = "AppearOtherResouce.aspx?type=moban&id=" + strID;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <br />
    <div style="margin: 0px auto; text-align: center;">
        <defineControls:CustomGridView ID="CustomGridView1" runat="server" AllowPaging="True"
            SkinID="List" AutoGenerateColumns="false" ShowCmpAndCancel="False" ShowItemNumber="true"
            ShowHideColModel="None" OnOnLoadData="CustomGridView1_OnLoadData" Width="100%"
            AllowOnMouseOverEvent="True" AutoGenerateDeleteConfirm="True" OnRowCreated="CustomGridView1_RowCreated">
            <PagerSettings Visible="False" />
            <Columns>
                <asp:BoundField DataField="MODULENAME" HeaderText="附件名称"></asp:BoundField>
                <asp:TemplateField HeaderText="附件模板">
                    <ItemTemplate>
                        <a href='#' onclick="DownLoad1('<%# DataBinder.Eval(Container.DataItem, "moduleid")%>')">
                            <%#GetFileName(Container)%></a>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="上传材料名称">
                    <ItemTemplate>
                        <a style="display: <%# GetFile(Container)%>" onclick="DownLoad('<%# DataBinder.Eval(Container.DataItem, "attachid")%>')"
                            href='#'>
                            <%#GetAttName(Container)%></a>
                        <asp:FileUpload ID="file1" Visible="<%# GetFileAtt(Container)%>" ToolTip='<%# DataBinder.Eval(Container.DataItem,"moduleid")%>'
                            runat="server" />
                        <asp:HiddenField ID="hfAttFileName" runat="server" Value='<%# DataBinder.Eval(Container.DataItem, "attfilename")%>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="上传材料编辑">
                    <ItemTemplate>
                        <asp:HyperLink ID="hlDelete" runat="server">删除</asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </defineControls:CustomGridView>
        <div>
            <asp:Button ID="btnUpFile" runat="server" Text="上传材料" OnClick="btnUpFile_Click" />
        </div>
    </div>
    </form>
</body>
</html>
